<!doctype html>
<%@page import="bean.Industry"%>
<%@page import="java.util.List"%>
<%@page import="bean.CompanyPost"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html; charset=utf-8"%>
<html>
<head>
<meta charset="utf-8">
<title>伯企业</title>
<style type="text/css">	
	.div {
	width: 80%;
	height: 100%;
	position: absolute;
	top:50px;
	left: 200px;
}
.table .gangwei{
	font-size: 40px;
}
.table .lie {
	font-size: 28px;
}
.table .hang {
	font-size: 20px;
}
</style>
</head>
<body>
<form action="SelectOneIndustryServlet">
<select name="industry">
<option value="">请选择行业</option>
<%
List<Industry> industrys=(ArrayList<Industry>)request.getAttribute("allIndustry");
for(Industry in:industrys){
%>
<option value=<%=in.getId()%>><%=in.getName()%></option>
<%
}
%>
</select>
<input type="submit" value="搜索">
</form>
<%
List<CompanyPost> posts=new ArrayList<CompanyPost>();
Object obj=request.getAttribute("allCompanyPost");
if(obj!=null){
	posts=(ArrayList<CompanyPost>)obj;
}
//序号
int index=1;
%>
	<div class="div">
	<form action="#" method="post">
		<table border="1" class="table">
		<%
			for(CompanyPost cp:posts){
			%>
			<tr>
				<th colspan="5" class="gangwei"><%=index %>.诚聘<%=cp.getName() %></th>
			</tr>
			<tr>
				<th class="lie">企业名称</th>
				<th class="lie">企业简介</th>
				<th class="lie">岗位职责和要求</th>
				<th class="lie">薪资</th>
				<th class="lie">工作地点</th>
			</tr>
			<tr>
				<td class="hang"><%=cp.getCompany().getName() %></td>
				<td class="hang"><%=cp.getCompany().getIntroduce() %></td>
				<td class="hang"><%=cp.getRequire() %></td>
				<td class="hang"><%=cp.getSalary() %>k</td>
				<td class="hang"><%=cp.getWorkingSpace()%></td>
			</tr>
			<%
			index++;
			}
			%>
		</table>
	</form>
</div>
</body>
</html>
